<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<c:choose>
	<c:when test="${page.totalPages >= 1 && page.totalCount >= 1}">
		<c:if test="${empty pageName}">
			<c:set var="pageName" value="page" />
		</c:if>
		<c:if test="${empty pageJsFunction}">
			<c:set var="pageJsFunction" value="goPage" />
		</c:if>
		<input type="hidden" name="${pageName}.pageSize" id="pageSize" value="${page.pageSize}" />
		<input type="hidden" name="${pageName}.orderBy" id="orderBy" value="${page.orderBy}" />
		<input type="hidden" name="${pageName}.order" id="order" value="${page.order}" />
		<input type="hidden" name="${pageName}.pageNo" id="pageNo" value="${page.pageNo}" />
		<div class="opback">
			<c:choose>
				<c:when test="${1 != page.pageNo}">
					<a href="javascript:${pageJsFunction}(1)" class="page_a_cur">首页</a>
					<a href="javascript:${pageJsFunction}(${page.prePage});" class="page_a_cur">上一页</a>
				</c:when>
				<c:otherwise>
					<span style="width: 28px;">首页</span>
					<span style="width: 38px;">上一页</span>
				</c:otherwise>
			</c:choose>

			<c:choose>
				<c:when test="${0!=page.totalPages && page.pageNo!=page.totalPages}">
					<a href="javascript:${pageJsFunction}(${page.nextPage})" class="page_a_cur">下一页</a>
					<a href="javascript:${pageJsFunction}(${page.totalPages})" class="page_a_cur">末页</a>
				</c:when>
				<c:otherwise>
					<span style="width: 38px;">下一页</span>
					<span style="width: 28px;">末页</span>
				</c:otherwise>
			</c:choose>
			<em style="display: inline-block; padding-top: 3px;">
				<select onchange="${pageJsFunction}(this.value); " style="font-size: 100%; height: 18px; vertical-align: middle;">
					<c:forEach begin="1" step="1" end="${page.totalPages}" varStatus="s">
						<option<c:if test="${page.pageNo == s.index}"> selected="selected"</c:if> value="${s.index}">${s.index} / ${page.totalPages}</option>
					</c:forEach>
			</select>
			</em>
		</div>
	</c:when>
	<c:when test="${null == page || page.totalPages <= 0 || page.totalCount <= 0}">
		<span>首页</span>
		<span>上一页</span>
		<span>下一页</span>
		<span>末页</span>
		<select disabled="disabled">
			<option>1/1</option>
		</select>
	</c:when>
</c:choose>